import apiMap from './apis'
import AxiosWrapper from '../src/index'

type API_NAME = keyof typeof apiMap

const axios = new AxiosWrapper<API_NAME>({
  apiMap: apiMap,
  baseURL: 'http://129.33.33.44:3821/',
  timeout: 15000,
  headers: {
    'Content-Type': 'application/json'
  },
});

export const req: AxiosWrapper<API_NAME>['request'] = (apiName, userConfig) => {
  return axios.request(apiName, userConfig)
}

req('apiName', {
  data: {},
  params: {}
})
